<?php

namespace App\Service\User\v1_1_4;

use App\Helpers\AliyunUtil;
use App\Model\GiftLog;
use App\Model\UserProfile;
use App\Service\BaseService;

/**
 * 用户礼物墙
 */
class UserGiftListService extends BaseService
{
    public function handle()
    {
        return [];
        $userId = $this->getUserId();
        $profileUserId = $this->request->input('profile_user_id', 0);
        $profileUserId = $profileUserId ?: $userId;
        $profile = UserProfile::getProfile($profileUserId);
        $giftInfo = GiftLog::getReceivedGiftInfo($profileUserId);
        $ret = [
            'avatar' => $profile->avatar,
            'nick_name' => $profile->nick_name,
            'gift_num' => $giftInfo['total_num'],
            'gift_coin' => $giftInfo['total_coin'],
            'list' => $giftInfo['list']
        ];
        // log_user_result($userId, json_encode($ret));
        return $ret;
    }
}
